package com.thinking.dubbo.common;

import com.alibaba.ttl.TransmittableThreadLocal;
import org.springframework.stereotype.Component;

/**
 * @ClassName TtlThreadUtil
 * @Description TODO
 * @Author tangsixiang@gmail.com
 * @Date 2023/6/3 16:18
 * @Version 1.0
 */

@Component
public class TtlThreadUtil

{
    private static TransmittableThreadLocal<String> threadLocal = new TransmittableThreadLocal<>();


    public static TransmittableThreadLocal<String> getThreadLocal() {
        return threadLocal;
    }

    public static void setThreadLocal(TransmittableThreadLocal<String> threadLocal) {
        TtlThreadUtil.threadLocal = threadLocal;
    }
}
